<template>

  <div class="app-container">
    <el-table v-loading="loading" :data="tableData">
      <el-table-column type="index" label="序号" width="80" align="center" />
      <el-table-column label="姓名" prop="name" min-width="100" />
      <el-table-column label="手机号" prop="telno" min-width="150" />
      <el-table-column label="需求描述" prop="requirement" min-width="300" />
    </el-table>
    <pagination
      v-show="total > 0"
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      :total="total"
      @pagination="getList"
    />
  </div>

</template>

<script setup>
import { miniappDataList } from '../../../../api/ven/index'
import useUserStore from '@/store/modules/user'
const loading = ref(false)
const data = reactive({
  tableData: [],
  total: '',
  queryParams: {
    pageNum: 1,
    pageSize: 10,
    venueId: useUserStore().user.venueId
  }
})
const { queryParams, tableData, total } = toRefs(data)
// 获取列表
function getList() {
  loading.value = true
  miniappDataList(queryParams.value).then(res => {
    loading.value = false
    tableData.value = res.rows
    total.value = res.total
  })
}
getList()
</script>

<style>


</style>
